#pragma once
#include "NeroGame\NGame.h"
#include "Floor.h"
#include "Cube.h"
#include "Ball.h"

namespace Graphics
{
	class Light;
	class ShadowShader;
	class DepthShader;
	class RenderTexture;
}

class ShadowApp : public Game::NGame
{
private:
	enum State
	{
		NULL_STATE,
		DEPTH_STATE,
		SHADOW_STATE_PRE,
		SHADOW_STATE
	};

	RTTI_DECLARATIONS(ShadowApp, Game::NGame)

public:
	ShadowApp(void);
	virtual ~ShadowApp(void);
	virtual void Initialize(const std::string& scene);
	virtual void Deinitialize();
	virtual void Update(float gameTime);
	virtual void Render();
	virtual void SetState(State state){mCurrentState = state;}
	virtual void PreRender();

private:
	State mCurrentState;
	Floor* mFloor;
	Cube* mCube;
	Ball* mSphere;
	Graphics::DepthShader* mDepthShader;
	Graphics::Light* mLight;
	Graphics::ShadowShader* mShadowShader;
	Graphics::RenderTexture* mRenderTexture;
};

